const path = require('path')
const resolve = dir => {
  return path.join(__dirname, dir)
}
module.exports = {
  publicPath: './',
  chainWebpack: config => {
    config.resolve.alias
      .set('_c', resolve('src/components')) // key,value自行定义，比如.set('@@', resolve('src/components'))
  },
  lintOnSave: false,
  //打包输出路径
  outputDir: 'web-app',
  //后端代理服务器
  devServer: {
      proxy: {
          '/gateway/': {
              target: 'http://localhost:8090/',
              changeOrigin: true,
              pathRewrite: {
                  '^/gateway/': ''
              }
          }
      }
  },
  runtimeCompiler: true
}
